<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <script>
        let res = 1
        switch (res) {
            case 1:
            case 2:
                console.log('2') // 打印2
                break
            case 3: 
                console.log('3')
                break
        }

    </script>
</body>
</html>
